import 'dotenv/config';
import { serve } from '@hono/node-server';
import app from './index.js';
serve(
  {
    fetch: app.fetch,
    port:
      process.env.PORT && !isNaN(parseInt(process.env.PORT)) ? parseInt(process.env.PORT) : 3000,
    hostname: process.env.HOST || '0.0.0.0'
  },
  info => {
    console.log(`Server is running on http://localhost:${info.port}`);
  }
);
